<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/8/12
  Time: 21:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>找回密码</title>
    <link rel="stylesheet" href="/static/css/reset.css">
    <link rel="stylesheet" href="/user/select.css">
    <%--layui css--%>
    <link rel="stylesheet" href="/static/layui/css/layui.css">

    <style>
        /* 弹窗 (background) */
        .xc-modal {
            display: none; /* 默认隐藏 */
            position: fixed;
            z-index: 1;
            padding-top: 100px;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgb(0,0,0);
            background-color: rgba(0,0,0,0.2);
        }
        /* 弹窗内容 */
        .xc-modal .xc-modal-content {
            position: relative;
            background-color: #fefefe;
            margin: auto;
            padding: 0;
            border: 1px solid #888;
            width: 660px;
            height: 400px;
            box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
            -webkit-animation-name: animatetop;
            -webkit-animation-duration: 0.4s;
            animation-name: animatetop;
            animation-duration: 0.4s
        }
        .xc-modal .xc-modal-content .xc-modal-header {
            padding: 2px 16px;
            color: black;
            height: 20px;
        }
        .xc-modal .xc-modal-content .xc-modal-header h2{
            left: 5px;
            line-height: 20px;
            font-weight: 800;
            font-size: 16px;
            margin-top: 10px;
        }
    </style>
</head>
<body>
<jsp:include page="/public/danhang.jsp"/>
<div class="xc-select-wrapper">
    <h2 class="xc-select-title">找回密码</h2>
    <div class="xc-content">
        <!--输入账号密码及登录部分-->
        <form action="/api/user/retrievePassword" class="xc-part-register"  method="post">
            <!--输入手机号-->
            <dl class="xc-inputPart">
                <dt class="xc-reg-label">注册手机号</dt>
                <dd class="xc-code-border">
                    <div class="xc-input-verificationCode">
                        <input class="xc-reg-inputAccount" type="text" placeholder="有效手机号" name="user_phone" autocomplete="off">
                    </div>
                </dd>
            </dl>
            <!--输入验证码-->
            <dl class="xc-inputPart">
                <dt class="xc-question">密码问题1：</dt>
                <%--                <br/>--%>
            </dl>
            <dl class="xc-inputPart">
                <dt class="xc-question">你父亲的名字？</dt>
                <dd class="xc-code-border">
                    <div class="xc-input-verificationCode">
                        <input class="xc-reg-inputAccount" type="text" placeholder="请输入答案" name="user_question1" autocomplete="off">
                    </div>
                </dd>
            </dl>
            <dl class="xc-inputPart">
                <dt class="xc-question">密码问题2：</dt>
            </dl>
            <dl class="xc-inputPart">
                <dt class="xc-question">你母亲的名字？</dt>
                <dd class="xc-code-border">
                    <div class="xc-input-verificationCode">
                        <input class="xc-reg-inputAccount" type="text" placeholder="请输入答案" name="user_question2" autocomplete="off" >
                    </div>
                </dd>
            </dl>
            <div class="xc-nextStep">
                <button class="xc-seg-btn" onclick="getPassword()" >找回密码</button>
                <div class="mm-login-error">${message}</div>
                <input id="msg" type="text" value="${message}" style="display: none">
            </div>
        </form>
    </div>
    <div style="width: 100%;;height: 40px"></div>
</div>
<jsp:include page="/public/footer.jsp"/>
<!-- 弹窗 -->
<script>
    function getPassword() {
        let result = document.getElementById("msg").value;
        console.log(result);
        // let result = document.getElementById("msg").value;
        // console.log(result);
        if(result != null){
            alert(result);
            // window.event.returnValue=false;
        }
    }
</script>
</body>
</html>
